package com.huawei.appmarket.support.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.TextView;
import o.cjz;
import o.dky$o;

public class CustomFontTextView extends TextView {

    enum a {
        DEFAULT(0),
        ASSISTANT(1);
        
        int ˋ;

        private a(int i) {
            this.ˋ = i;
        }

        static a ˎ(int i) {
            for (a aVar : values()) {
                if (aVar.ˋ == i) {
                    return aVar;
                }
            }
            throw new IllegalArgumentException();
        }
    }

    public CustomFontTextView(Context context) {
        super(context);
        ॱ(context, null);
    }

    public CustomFontTextView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        ॱ(context, attributeSet);
    }

    public CustomFontTextView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        ॱ(context, attributeSet);
    }

    private void ॱ(Context context, AttributeSet attributeSet) {
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, dky$o.ˎˎ);
            int indexCount = obtainStyledAttributes.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                if (dky$o.ˌ == obtainStyledAttributes.getIndex(i)) {
                    ˎ(a.ˎ(obtainStyledAttributes.getInt(dky$o.ˌ, 0)));
                    break;
                }
            }
            obtainStyledAttributes.recycle();
        }
    }

    private void ˎ(a aVar) {
        if (aVar != null) {
            switch (aVar) {
                case DEFAULT:
                    return;
                case ASSISTANT:
                    cjz.ˎ(this);
                    return;
                default:
                    return;
            }
        }
    }
}
